package com.morningstar.qs.api.basic.util;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.LinkedHashMap;

import org.apache.http.client.ClientProtocolException;

import com.mstar.qs.common.DefQsException;

/**
 * @deprecated
 * @author dchen2
 *
 */
public interface MsHttpClient {
	public QueryCombination execute(LinkedHashMap<String, String> params) throws DefQsException;
	public QueryCombination execute(String url) throws ClientProtocolException, IOException, URISyntaxException;
	public QueryCombination executePost(String url) throws ClientProtocolException, IOException, URISyntaxException;
	
	public static class QueryCombination{
		private URI uri;
		private String valueReturn;
		private Object attachment;
		
		public QueryCombination() {}
		public QueryCombination(String value) {
			this.valueReturn=value;
		}
		public QueryCombination(URI uri, String value) {
			this.uri=uri;
			this.valueReturn=value;
		}
		
		public URI getUri() {
			return uri;
		}
		public void setUri(URI uri) {
			this.uri = uri;
		}
		public String getValueReturn() {
			return valueReturn;
		}
		public void setValueReturn(String valueReturn) {
			this.valueReturn = valueReturn;
		}
		public Object getAttachment() {
			return attachment;
		}
		public void setAttachment(Object attachment) {
			this.attachment = attachment;
		}
		
	}
}
